$(function(){
    app.confirmDelete()
})
var app = {
    toggle:function(el,collectionName,attr,id){
        $.get('/admin/changeStatus',{collectionName:collectionName,attr:attr,id:id},function(data){
            if(data.success){
                if($(el).attr('class').indexOf('icon-ok') != -1){
                    $(el).attr('class','icon-remove bigger-120 success')
                }else{
                    $(el).attr('class','icon-ok bigger-120 success')
                }
            }
        })    
    },
    confirmDelete(){
        $('.delete').click(function(){
            var flag = confirm('您确定要删除吗？')
            return flag
        })
    }
}